// pages/components/yxFooterShopCart/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    bottom:{
      type:String
    },
    list:{
      type:Array,
      observer:function(newVal,oldVal,change){
        console.log(newVal, oldVal, change)
        let count=0,money=0
        if(this.properties.list.length>0){
          this.properties.list.forEach((i,index)=>{
            count+=i.num
            money+=(i.money*i.num)
          })
          this.setData({
            count,
            money
          })
        }
      }
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    count:0,
    money:0
  },

  /**
   * 组件的方法列表
   */
  methods: {
    gozhifu(){
      wx.navigateTo({
        url: '/pages/youXuan/orderSure/index',
      })
    }
  }
})
